<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Keywords" content="cssfile">
<meta name="Description" content="">
<meta name="format-detection" content="telephone=no" />
<meta property="wb:webmaster" content="ed0a75e93ed55263" />
<meta name="renderer" content="webkit">
<title> 好乐买 正品鞋</title>
<link rel="shortcut icon" href="http://0.js.lx.okbuycdn.com/resources/images/favicon.ico">
<link rel="stylesheet" type="text/css" href="{{asset('/HomeCss/css/login.css')}}">
<script type="text/javascript" src="{{asset('/HomeCss/js/jquery-1.9.0.js')}}"></script>
<script type="text/javascript" src="{{asset('/HomeCss/js/jquery.validate.js')}}"></script>
<script type="text/javascript" src="{{asset('/HomeCss/js/jquery.form.js')}}"></script>
<script type="text/javascript" src="{{asset('/HomeCss/js/miniheader.js')}}"></script>
<script type="text/javascript" src="{{asset('/HomeCss/js/inputstyle.js')}}"></script>
<script type="text/javascript" src="{{asset('/HomeCss/js/logincheck.js')}}"></script>
</head>
<body>
<div class="miniheader">
    <div class="miniheaderLeft"><a href="/"><img src="{{asset('/HomeCss/picture/miniheaderlogo.png')}}" alt='okbuy'></a></div>
	<div class="miniheaderMiddle" style="width:250px;float:left;margin:10px 0px 0px 300px;color:red;">
       @if(session('error'))
            <span>{{session('error')}}</span>
        @endif
    </div>
    <div class="miniheaderRight">
        <cite id="top_nologin" style="display: inline-block;">
    	<a href="/home/login/login" title="">登录</a><span>|</span>
		<a href="/home/login/regist" title="">注册</a>
    </div>
</div><!--[if IE 6]>
<script> document.execCommand("BackgroundImageCache", false, true); </script>
<![endif]-->
<div class="loginwarpper">

        <form class="find_1" id="getpwdform"  action="{{asset('/home/login/doupw')}}" method="post">
        <img src="http://0.js.lx.okbuycdn.com/resources/images/v6/common/findpw.gif">
        <div style="color:red;"></div>
        <p class="email" style="font-size:18px;">手机：
            <span>{{$tel->tel}}</span>
            <input id="tel" name="tel" value="{{$tel->tel}}" type="hidden">
            <input name="uid" value="{{$tel->uid}}" type="hidden">
        </p>
                
        <div style="margin-left:10px;margin-top:10px;margin-bottom:10px;">
            <div>如果未收到请点击
            <!-- id="get_mobile_code_button"  -->
            <button type="button" class="SendCode" style="height:30px;width:100px">获取验证码</button>

            </div>
        </div>

        <div id="get_mobile_code_need_validate"></div>
        
        <p class="email">请输入手机校验码：</p>
        <div class="login_txt">
            <input name="pcode" id="mobile_code" maxlength="6" type="text"><label class="new_error" id="checkcode"></label>
            
        </div>
        {{ csrf_field() }}
        <button  class="next_btn" value="下一步" id="next_btn" type="submit">下一步</button>

    </form>
    <div class="OB_clearB"></div>
</div>
	<script type="text/javascript">
		new dk_slideplayer("#pub_slideplay",{width:"474px",height:"588px",time:"4000",float:"left"});
	</script><div class="OB_clearB"></div>
<div class="minifooter">Copyright © 2007-2017 OkBuy.com All Rights Reserved&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;天津好乐买信息技术有限公司&nbsp;&nbsp;津B2-20140020&nbsp;&nbsp;京公网安备&nbsp;110105006859</div>
<script type="text/javascript">
    //声明全局变量
    var CPCODE = false;
    
    //绑定表单事件
    $('form').submit(function(){
        //判断是否全部成功
        if(CPCODE){
            return true;
        }else{

        return false;
        }
    })
    //发送手机验证码
    $('.SendCode').click(function(){
        //获取手机号
        var tel = $('#tel').val();

        //发送ajax 请求验证码
        $.get('/home/login/sendcode',{tel:tel},function(data){
        })
        //定时按钮
        var count = 10;
        var countdown = setInterval(CountDown, 1000);
        function CountDown(){
        $(".SendCode").attr("disabled", true);
        $(".SendCode").html("请"+count+"秒后重试");
        if (count == 0) {
        $(".SendCode").html("获取验证码").removeAttr("disabled");
        clearInterval(countdown);
        }
        count--;
        }
        
    })

    //手机验证码验证
    $('input[name=pcode]').blur(function(){
        //获取验证码
        var pcode = $('input[name=pcode]').val();
        if(!pcode){
            $('#checkcode').html('验证码不能为空');
            CPCODE = false;
            return false;
        }else{
            //清除 样式
             $('#checkcode').html('');
            //当输入域丧失焦点时 发送ajax
            $.get('/home/login/pcode',{pcode:pcode},function(data){
                if(data == 1){
                    CPCODE = true;
                }else{
                    $('#checkcode').html('验证码错误');
                    CPCODE = false;
                    return false;
                }
            })
        }
    })
</script>
</body>

</html> 
